package com.nowcoder.community.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.text.SimpleDateFormat;

/**
 * @author: caoxinfang
 * @email: 2717176337@qq.com
 * @date: 2022/3/6 23:00
 */
@Configuration
public class AlphaConfig {

    @Bean /*方法返回的对象将被装配到容器中*/
    public SimpleDateFormat simpleDateFormat() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    }

}
